<!--
 * @Author: 高瑞寒 15932717091@163.com
 * @Date: 2022-02-15 13:14:04
 * @LastEditTime: 2022-03-15 17:16:28
 * @LastEditors: 高瑞寒 15932717091@163.com
 * @Description:
-->

<template>
  <div class>
    <el-timeline>
      <el-timeline-item
        v-for="i in chapterData"
        :key="i.id"
        :timestamp="i.timestamp"
        placement="top"
      >
        <el-card>
          <h4>{{i.content}}</h4>
        </el-card>
      </el-timeline-item>
    </el-timeline>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { chapter } from '@/api/user'
import { watchSwitchLang } from '@/utils/i18n'
const chapterData = ref([])
const getChapter = async () => {
  chapterData.value = await chapter()
}
getChapter()
watchSwitchLang(getChapter)
</script>

<style lang='scss' scoped>
</style>
